#define _CRT_SECURE_NO_WARNINGS 1
namespace vic
{
	template<class K, class Hash=HashFunc<K>>
	class unordered_set
	{
		struct SetKeyOfT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
	public:
		typedef typename Bucket::HashTable<K, K, Hash, SetKeyOfT>::iterator iterator;

		iterator begin()
		{
			return _ht.begin();
		}

		iterator end()
		{
			return _ht.end();
		}
		pair<iterator, bool> Insert(const K& key)
		{
			return _ht.Insert(key);
		}
	private:
		Bucket::HashTable<K, K,Hash,SetKeyOfT> _ht;
	};
	void test_set()
	{
		unordered_set<int> s;
		s.Insert(2);
		s.Insert(3);
		s.Insert(1);
		s.Insert(2);
		s.Insert(5);
		unordered_set<int>::iterator it = s.begin();
		//auto it = s.begin();
		while (it != s.end())
		{
			cout << *it << " ";
			++it;
		}
		cout << endl;
		
	}
}